//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension WorkSpaces {
    // MARK: Enums

    public enum AccessPropertyValue: String, CustomStringConvertible, Codable {
        case allow = "ALLOW"
        case deny = "DENY"
        public var description: String { return self.rawValue }
    }

    public enum Application: String, CustomStringConvertible, Codable {
        case microsoftOffice2016 = "Microsoft_Office_2016"
        case microsoftOffice2019 = "Microsoft_Office_2019"
        public var description: String { return self.rawValue }
    }

    public enum AssociationStatus: String, CustomStringConvertible, Codable {
        case associatedWithOwnerAccount = "ASSOCIATED_WITH_OWNER_ACCOUNT"
        case associatedWithSharedAccount = "ASSOCIATED_WITH_SHARED_ACCOUNT"
        case notAssociated = "NOT_ASSOCIATED"
        case pendingAssociation = "PENDING_ASSOCIATION"
        case pendingDisassociation = "PENDING_DISASSOCIATION"
        public var description: String { return self.rawValue }
    }

    public enum Compute: String, CustomStringConvertible, Codable {
        case graphics = "GRAPHICS"
        case graphicspro = "GRAPHICSPRO"
        case performance = "PERFORMANCE"
        case power = "POWER"
        case powerpro = "POWERPRO"
        case standard = "STANDARD"
        case value = "VALUE"
        public var description: String { return self.rawValue }
    }

    public enum ConnectionAliasState: String, CustomStringConvertible, Codable {
        case created = "CREATED"
        case creating = "CREATING"
        case deleting = "DELETING"
        public var description: String { return self.rawValue }
    }

    public enum ConnectionState: String, CustomStringConvertible, Codable {
        case connected = "CONNECTED"
        case disconnected = "DISCONNECTED"
        case unknown = "UNKNOWN"
        public var description: String { return self.rawValue }
    }

    public enum DedicatedTenancyModificationStateEnum: String, CustomStringConvertible, Codable {
        case completed = "COMPLETED"
        case failed = "FAILED"
        case pending = "PENDING"
        public var description: String { return self.rawValue }
    }

    public enum DedicatedTenancySupportEnum: String, CustomStringConvertible, Codable {
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum DedicatedTenancySupportResultEnum: String, CustomStringConvertible, Codable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum ImageType: String, CustomStringConvertible, Codable {
        case owned = "OWNED"
        case shared = "SHARED"
        public var description: String { return self.rawValue }
    }

    public enum ModificationResourceEnum: String, CustomStringConvertible, Codable {
        case computeType = "COMPUTE_TYPE"
        case rootVolume = "ROOT_VOLUME"
        case userVolume = "USER_VOLUME"
        public var description: String { return self.rawValue }
    }

    public enum ModificationStateEnum: String, CustomStringConvertible, Codable {
        case updateInProgress = "UPDATE_IN_PROGRESS"
        case updateInitiated = "UPDATE_INITIATED"
        public var description: String { return self.rawValue }
    }

    public enum OperatingSystemType: String, CustomStringConvertible, Codable {
        case linux = "LINUX"
        case windows = "WINDOWS"
        public var description: String { return self.rawValue }
    }

    public enum ReconnectEnum: String, CustomStringConvertible, Codable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum RunningMode: String, CustomStringConvertible, Codable {
        case alwaysOn = "ALWAYS_ON"
        case autoStop = "AUTO_STOP"
        public var description: String { return self.rawValue }
    }

    public enum TargetWorkspaceState: String, CustomStringConvertible, Codable {
        case adminMaintenance = "ADMIN_MAINTENANCE"
        case available = "AVAILABLE"
        public var description: String { return self.rawValue }
    }

    public enum Tenancy: String, CustomStringConvertible, Codable {
        case dedicated = "DEDICATED"
        case shared = "SHARED"
        public var description: String { return self.rawValue }
    }

    public enum WorkspaceDirectoryState: String, CustomStringConvertible, Codable {
        case deregistered = "DEREGISTERED"
        case deregistering = "DEREGISTERING"
        case error = "ERROR"
        case registered = "REGISTERED"
        case registering = "REGISTERING"
        public var description: String { return self.rawValue }
    }

    public enum WorkspaceDirectoryType: String, CustomStringConvertible, Codable {
        case adConnector = "AD_CONNECTOR"
        case simpleAd = "SIMPLE_AD"
        public var description: String { return self.rawValue }
    }

    public enum WorkspaceImageIngestionProcess: String, CustomStringConvertible, Codable {
        case byolGraphics = "BYOL_GRAPHICS"
        case byolGraphicspro = "BYOL_GRAPHICSPRO"
        case byolRegular = "BYOL_REGULAR"
        case byolRegularWsp = "BYOL_REGULAR_WSP"
        public var description: String { return self.rawValue }
    }

    public enum WorkspaceImageRequiredTenancy: String, CustomStringConvertible, Codable {
        case dedicated = "DEDICATED"
        case `default` = "DEFAULT"
        public var description: String { return self.rawValue }
    }

    public enum WorkspaceImageState: String, CustomStringConvertible, Codable {
        case available = "AVAILABLE"
        case error = "ERROR"
        case pending = "PENDING"
        public var description: String { return self.rawValue }
    }

    public enum WorkspaceState: String, CustomStringConvertible, Codable {
        case adminMaintenance = "ADMIN_MAINTENANCE"
        case available = "AVAILABLE"
        case error = "ERROR"
        case impaired = "IMPAIRED"
        case maintenance = "MAINTENANCE"
        case pending = "PENDING"
        case rebooting = "REBOOTING"
        case rebuilding = "REBUILDING"
        case restoring = "RESTORING"
        case starting = "STARTING"
        case stopped = "STOPPED"
        case stopping = "STOPPING"
        case suspended = "SUSPENDED"
        case terminated = "TERMINATED"
        case terminating = "TERMINATING"
        case unhealthy = "UNHEALTHY"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AccountModification: AWSDecodableShape {
        /// The IP address range, specified as an IPv4 CIDR block, for the management network interface used for the account.
        public let dedicatedTenancyManagementCidrRange: String?
        /// The status of BYOL (whether BYOL is being enabled or disabled).
        public let dedicatedTenancySupport: DedicatedTenancySupportResultEnum?
        /// The error code that is returned if the configuration of BYOL cannot be modified.
        public let errorCode: String?
        /// The text of the error message that is returned if the configuration of BYOL cannot be modified.
        public let errorMessage: String?
        /// The state of the modification to the configuration of BYOL.
        public let modificationState: DedicatedTenancyModificationStateEnum?
        /// The timestamp when the modification of the BYOL configuration was started.
        public let startTime: Date?

        public init(dedicatedTenancyManagementCidrRange: String? = nil, dedicatedTenancySupport: DedicatedTenancySupportResultEnum? = nil, errorCode: String? = nil, errorMessage: String? = nil, modificationState: DedicatedTenancyModificationStateEnum? = nil, startTime: Date? = nil) {
            self.dedicatedTenancyManagementCidrRange = dedicatedTenancyManagementCidrRange
            self.dedicatedTenancySupport = dedicatedTenancySupport
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.modificationState = modificationState
            self.startTime = startTime
        }

        private enum CodingKeys: String, CodingKey {
            case dedicatedTenancyManagementCidrRange = "DedicatedTenancyManagementCidrRange"
            case dedicatedTenancySupport = "DedicatedTenancySupport"
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case modificationState = "ModificationState"
            case startTime = "StartTime"
        }
    }

    public struct AssociateConnectionAliasRequest: AWSEncodableShape {
        /// The identifier of the connection alias.
        public let aliasId: String
        /// The identifier of the directory to associate the connection alias with.
        public let resourceId: String

        public init(aliasId: String, resourceId: String) {
            self.aliasId = aliasId
            self.resourceId = resourceId
        }

        public func validate(name: String) throws {
            try self.validate(self.aliasId, name: "aliasId", parent: name, max: 68)
            try self.validate(self.aliasId, name: "aliasId", parent: name, min: 13)
            try self.validate(self.aliasId, name: "aliasId", parent: name, pattern: "^wsca-[0-9a-z]{8,63}$")
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case aliasId = "AliasId"
            case resourceId = "ResourceId"
        }
    }

    public struct AssociateConnectionAliasResult: AWSDecodableShape {
        /// The identifier of the connection alias association. You use the connection identifier in the DNS TXT record when you're configuring your DNS routing policies.
        public let connectionIdentifier: String?

        public init(connectionIdentifier: String? = nil) {
            self.connectionIdentifier = connectionIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case connectionIdentifier = "ConnectionIdentifier"
        }
    }

    public struct AssociateIpGroupsRequest: AWSEncodableShape {
        /// The identifier of the directory.
        public let directoryId: String
        /// The identifiers of one or more IP access control groups.
        public let groupIds: [String]

        public init(directoryId: String, groupIds: [String]) {
            self.directoryId = directoryId
            self.groupIds = groupIds
        }

        public func validate(name: String) throws {
            try self.validate(self.directoryId, name: "directoryId", parent: name, max: 65)
            try self.validate(self.directoryId, name: "directoryId", parent: name, min: 10)
            try self.validate(self.directoryId, name: "directoryId", parent: name, pattern: "^d-[0-9a-f]{8,63}$")
            try self.groupIds.forEach {
                try validate($0, name: "groupIds[]", parent: name, pattern: "wsipg-[0-9a-z]{8,63}$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case directoryId = "DirectoryId"
            case groupIds = "GroupIds"
        }
    }

    public struct AssociateIpGroupsResult: AWSDecodableShape {
        public init() {}
    }

    public struct AuthorizeIpRulesRequest: AWSEncodableShape {
        /// The identifier of the group.
        public let groupId: String
        /// The rules to add to the group.
        public let userRules: [IpRuleItem]

        public init(groupId: String, userRules: [IpRuleItem]) {
            self.groupId = groupId
            self.userRules = userRules
        }

        public func validate(name: String) throws {
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "wsipg-[0-9a-z]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
            case userRules = "UserRules"
        }
    }

    public struct AuthorizeIpRulesResult: AWSDecodableShape {
        public init() {}
    }

    public struct ClientProperties: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether users can cache their credentials on the Amazon WorkSpaces client. When enabled, users can choose to reconnect to their WorkSpaces without re-entering their credentials.
        public let reconnectEnabled: ReconnectEnum?

        public init(reconnectEnabled: ReconnectEnum? = nil) {
            self.reconnectEnabled = reconnectEnabled
        }

        private enum CodingKeys: String, CodingKey {
            case reconnectEnabled = "ReconnectEnabled"
        }
    }

    public struct ClientPropertiesResult: AWSDecodableShape {
        /// Information about the Amazon WorkSpaces client.
        public let clientProperties: ClientProperties?
        /// The resource identifier, in the form of a directory ID.
        public let resourceId: String?

        public init(clientProperties: ClientProperties? = nil, resourceId: String? = nil) {
            self.clientProperties = clientProperties
            self.resourceId = resourceId
        }

        private enum CodingKeys: String, CodingKey {
            case clientProperties = "ClientProperties"
            case resourceId = "ResourceId"
        }
    }

    public struct ComputeType: AWSDecodableShape {
        /// The compute type.
        public let name: Compute?

        public init(name: Compute? = nil) {
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct ConnectionAlias: AWSDecodableShape {
        /// The identifier of the connection alias.
        public let aliasId: String?
        /// The association status of the connection alias.
        public let associations: [ConnectionAliasAssociation]?
        /// The connection string specified for the connection alias. The connection string must be in the form of a fully qualified domain name (FQDN), such as www.example.com.
        public let connectionString: String?
        /// The identifier of the AWS account that owns the connection alias.
        public let ownerAccountId: String?
        /// The current state of the connection alias.
        public let state: ConnectionAliasState?

        public init(aliasId: String? = nil, associations: [ConnectionAliasAssociation]? = nil, connectionString: String? = nil, ownerAccountId: String? = nil, state: ConnectionAliasState? = nil) {
            self.aliasId = aliasId
            self.associations = associations
            self.connectionString = connectionString
            self.ownerAccountId = ownerAccountId
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case aliasId = "AliasId"
            case associations = "Associations"
            case connectionString = "ConnectionString"
            case ownerAccountId = "OwnerAccountId"
            case state = "State"
        }
    }

    public struct ConnectionAliasAssociation: AWSDecodableShape {
        /// The identifier of the AWS account that associated the connection alias with a directory.
        public let associatedAccountId: String?
        /// The association status of the connection alias.
        public let associationStatus: AssociationStatus?
        /// The identifier of the connection alias association. You use the connection identifier in the DNS TXT record when you're configuring your DNS routing policies.
        public let connectionIdentifier: String?
        /// The identifier of the directory associated with a connection alias.
        public let resourceId: String?

        public init(associatedAccountId: String? = nil, associationStatus: AssociationStatus? = nil, connectionIdentifier: String? = nil, resourceId: String? = nil) {
            self.associatedAccountId = associatedAccountId
            self.associationStatus = associationStatus
            self.connectionIdentifier = connectionIdentifier
            self.resourceId = resourceId
        }

        private enum CodingKeys: String, CodingKey {
            case associatedAccountId = "AssociatedAccountId"
            case associationStatus = "AssociationStatus"
            case connectionIdentifier = "ConnectionIdentifier"
            case resourceId = "ResourceId"
        }
    }

    public struct ConnectionAliasPermission: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether the specified AWS account is allowed to associate the connection alias with a directory.
        public let allowAssociation: Bool
        /// The identifier of the AWS account that the connection alias is shared with.
        public let sharedAccountId: String

        public init(allowAssociation: Bool, sharedAccountId: String) {
            self.allowAssociation = allowAssociation
            self.sharedAccountId = sharedAccountId
        }

        public func validate(name: String) throws {
            try self.validate(self.sharedAccountId, name: "sharedAccountId", parent: name, pattern: "^\\d{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case allowAssociation = "AllowAssociation"
            case sharedAccountId = "SharedAccountId"
        }
    }

    public struct CopyWorkspaceImageRequest: AWSEncodableShape {
        /// A description of the image.
        public let description: String?
        /// The name of the image.
        public let name: String
        /// The identifier of the source image.
        public let sourceImageId: String
        /// The identifier of the source Region.
        public let sourceRegion: String
        /// The tags for the image.
        public let tags: [Tag]?

        public init(description: String? = nil, name: String, sourceImageId: String, sourceRegion: String, tags: [Tag]? = nil) {
            self.description = description
            self.name = name
            self.sourceImageId = sourceImageId
            self.sourceRegion = sourceRegion
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 256)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[a-zA-Z0-9_./() -]+$")
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9_./()\\\\-]+$")
            try self.validate(self.sourceImageId, name: "sourceImageId", parent: name, pattern: "wsi-[0-9a-z]{9,63}$")
            try self.validate(self.sourceRegion, name: "sourceRegion", parent: name, max: 31)
            try self.validate(self.sourceRegion, name: "sourceRegion", parent: name, min: 1)
            try self.validate(self.sourceRegion, name: "sourceRegion", parent: name, pattern: "^[-0-9a-z]{1,31}$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case name = "Name"
            case sourceImageId = "SourceImageId"
            case sourceRegion = "SourceRegion"
            case tags = "Tags"
        }
    }

    public struct CopyWorkspaceImageResult: AWSDecodableShape {
        /// The identifier of the image.
        public let imageId: String?

        public init(imageId: String? = nil) {
            self.imageId = imageId
        }

        private enum CodingKeys: String, CodingKey {
            case imageId = "ImageId"
        }
    }

    public struct CreateConnectionAliasRequest: AWSEncodableShape {
        /// A connection string in the form of a fully qualified domain name (FQDN), such as www.example.com.  After you create a connection string, it is always associated to your AWS account. You cannot recreate the same connection string with a different account, even if you delete all instances of it from the original account. The connection string is globally reserved for your account.
        public let connectionString: String
        /// The tags to associate with the connection alias.
        public let tags: [Tag]?

        public init(connectionString: String, tags: [Tag]? = nil) {
            self.connectionString = connectionString
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.connectionString, name: "connectionString", parent: name, max: 255)
            try self.validate(self.connectionString, name: "connectionString", parent: name, min: 1)
            try self.validate(self.connectionString, name: "connectionString", parent: name, pattern: "^[.0-9a-zA-Z\\-]{1,255}$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case connectionString = "ConnectionString"
            case tags = "Tags"
        }
    }

    public struct CreateConnectionAliasResult: AWSDecodableShape {
        /// The identifier of the connection alias.
        public let aliasId: String?

        public init(aliasId: String? = nil) {
            self.aliasId = aliasId
        }

        private enum CodingKeys: String, CodingKey {
            case aliasId = "AliasId"
        }
    }

    public struct CreateIpGroupRequest: AWSEncodableShape {
        /// The description of the group.
        public let groupDesc: String?
        /// The name of the group.
        public let groupName: String
        /// The tags. Each WorkSpaces resource can have a maximum of 50 tags.
        public let tags: [Tag]?
        /// The rules to add to the group.
        public let userRules: [IpRuleItem]?

        public init(groupDesc: String? = nil, groupName: String, tags: [Tag]? = nil, userRules: [IpRuleItem]? = nil) {
            self.groupDesc = groupDesc
            self.groupName = groupName
            self.tags = tags
            self.userRules = userRules
        }

        public func validate(name: String) throws {
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case groupDesc = "GroupDesc"
            case groupName = "GroupName"
            case tags = "Tags"
            case userRules = "UserRules"
        }
    }

    public struct CreateIpGroupResult: AWSDecodableShape {
        /// The identifier of the group.
        public let groupId: String?

        public init(groupId: String? = nil) {
            self.groupId = groupId
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
        }
    }

    public struct CreateTagsRequest: AWSEncodableShape {
        /// The identifier of the WorkSpaces resource. The supported resource types are WorkSpaces, registered directories, images, custom bundles, IP access control groups, and connection aliases.
        public let resourceId: String
        /// The tags. Each WorkSpaces resource can have a maximum of 50 tags.
        public let tags: [Tag]

        public init(resourceId: String, tags: [Tag]) {
            self.resourceId = resourceId
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceId = "ResourceId"
            case tags = "Tags"
        }
    }

    public struct CreateTagsResult: AWSDecodableShape {
        public init() {}
    }

    public struct CreateWorkspacesRequest: AWSEncodableShape {
        /// The WorkSpaces to create. You can specify up to 25 WorkSpaces.
        public let workspaces: [WorkspaceRequest]

        public init(workspaces: [WorkspaceRequest]) {
            self.workspaces = workspaces
        }

        public func validate(name: String) throws {
            try self.workspaces.forEach {
                try $0.validate(name: "\(name).workspaces[]")
            }
            try self.validate(self.workspaces, name: "workspaces", parent: name, max: 25)
            try self.validate(self.workspaces, name: "workspaces", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case workspaces = "Workspaces"
        }
    }

    public struct CreateWorkspacesResult: AWSDecodableShape {
        /// Information about the WorkSpaces that could not be created.
        public let failedRequests: [FailedCreateWorkspaceRequest]?
        /// Information about the WorkSpaces that were created. Because this operation is asynchronous, the identifier returned is not immediately available for use with other operations. For example, if you call DescribeWorkspaces before the WorkSpace is created, the information returned can be incomplete.
        public let pendingRequests: [Workspace]?

        public init(failedRequests: [FailedCreateWorkspaceRequest]? = nil, pendingRequests: [Workspace]? = nil) {
            self.failedRequests = failedRequests
            self.pendingRequests = pendingRequests
        }

        private enum CodingKeys: String, CodingKey {
            case failedRequests = "FailedRequests"
            case pendingRequests = "PendingRequests"
        }
    }

    public struct DefaultWorkspaceCreationProperties: AWSDecodableShape {
        /// The identifier of the default security group to apply to WorkSpaces when they are created. For more information, see  Security Groups for Your WorkSpaces.
        public let customSecurityGroupId: String?
        /// The organizational unit (OU) in the directory for the WorkSpace machine accounts.
        public let defaultOu: String?
        /// Specifies whether to automatically assign an Elastic public IP address to WorkSpaces in this directory by default. If enabled, the Elastic public IP address allows outbound internet access from your WorkSpaces when you’re using an internet gateway in the Amazon VPC in which your WorkSpaces are located. If you're using a Network Address Translation (NAT) gateway for outbound internet access from your VPC, or if your WorkSpaces are in public subnets and you manually assign them Elastic IP addresses, you should disable this setting. This setting applies to new WorkSpaces that you launch or to existing WorkSpaces that you rebuild. For more information, see  Configure a VPC for Amazon WorkSpaces.
        public let enableInternetAccess: Bool?
        /// Specifies whether maintenance mode is enabled for WorkSpaces. For more information, see WorkSpace Maintenance.
        public let enableMaintenanceMode: Bool?
        /// Specifies whether the directory is enabled for Amazon WorkDocs.
        public let enableWorkDocs: Bool?
        /// Specifies whether WorkSpace users are local administrators on their WorkSpaces.
        public let userEnabledAsLocalAdministrator: Bool?

        public init(customSecurityGroupId: String? = nil, defaultOu: String? = nil, enableInternetAccess: Bool? = nil, enableMaintenanceMode: Bool? = nil, enableWorkDocs: Bool? = nil, userEnabledAsLocalAdministrator: Bool? = nil) {
            self.customSecurityGroupId = customSecurityGroupId
            self.defaultOu = defaultOu
            self.enableInternetAccess = enableInternetAccess
            self.enableMaintenanceMode = enableMaintenanceMode
            self.enableWorkDocs = enableWorkDocs
            self.userEnabledAsLocalAdministrator = userEnabledAsLocalAdministrator
        }

        private enum CodingKeys: String, CodingKey {
            case customSecurityGroupId = "CustomSecurityGroupId"
            case defaultOu = "DefaultOu"
            case enableInternetAccess = "EnableInternetAccess"
            case enableMaintenanceMode = "EnableMaintenanceMode"
            case enableWorkDocs = "EnableWorkDocs"
            case userEnabledAsLocalAdministrator = "UserEnabledAsLocalAdministrator"
        }
    }

    public struct DeleteConnectionAliasRequest: AWSEncodableShape {
        /// The identifier of the connection alias to delete.
        public let aliasId: String

        public init(aliasId: String) {
            self.aliasId = aliasId
        }

        public func validate(name: String) throws {
            try self.validate(self.aliasId, name: "aliasId", parent: name, max: 68)
            try self.validate(self.aliasId, name: "aliasId", parent: name, min: 13)
            try self.validate(self.aliasId, name: "aliasId", parent: name, pattern: "^wsca-[0-9a-z]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case aliasId = "AliasId"
        }
    }

    public struct DeleteConnectionAliasResult: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteIpGroupRequest: AWSEncodableShape {
        /// The identifier of the IP access control group.
        public let groupId: String

        public init(groupId: String) {
            self.groupId = groupId
        }

        public func validate(name: String) throws {
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "wsipg-[0-9a-z]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
        }
    }

    public struct DeleteIpGroupResult: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteTagsRequest: AWSEncodableShape {
        /// The identifier of the WorkSpaces resource. The supported resource types are WorkSpaces, registered directories, images, custom bundles, IP access control groups, and connection aliases.
        public let resourceId: String
        /// The tag keys.
        public let tagKeys: [String]

        public init(resourceId: String, tagKeys: [String]) {
            self.resourceId = resourceId
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceId = "ResourceId"
            case tagKeys = "TagKeys"
        }
    }

    public struct DeleteTagsResult: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteWorkspaceImageRequest: AWSEncodableShape {
        /// The identifier of the image.
        public let imageId: String

        public init(imageId: String) {
            self.imageId = imageId
        }

        public func validate(name: String) throws {
            try self.validate(self.imageId, name: "imageId", parent: name, pattern: "wsi-[0-9a-z]{9,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case imageId = "ImageId"
        }
    }

    public struct DeleteWorkspaceImageResult: AWSDecodableShape {
        public init() {}
    }

    public struct DeregisterWorkspaceDirectoryRequest: AWSEncodableShape {
        /// The identifier of the directory. If any WorkSpaces are registered to this directory, you must remove them before you deregister the directory, or you will receive an OperationNotSupportedException error.
        public let directoryId: String

        public init(directoryId: String) {
            self.directoryId = directoryId
        }

        public func validate(name: String) throws {
            try self.validate(self.directoryId, name: "directoryId", parent: name, max: 65)
            try self.validate(self.directoryId, name: "directoryId", parent: name, min: 10)
            try self.validate(self.directoryId, name: "directoryId", parent: name, pattern: "^d-[0-9a-f]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case directoryId = "DirectoryId"
        }
    }

    public struct DeregisterWorkspaceDirectoryResult: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeAccountModificationsRequest: AWSEncodableShape {
        /// If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.
        public let nextToken: String?

        public init(nextToken: String? = nil) {
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
        }
    }

    public struct DescribeAccountModificationsResult: AWSDecodableShape {
        /// The list of modifications to the configuration of BYOL.
        public let accountModifications: [AccountModification]?
        /// The token to use to retrieve the next set of results, or null if no more results are available.
        public let nextToken: String?

        public init(accountModifications: [AccountModification]? = nil, nextToken: String? = nil) {
            self.accountModifications = accountModifications
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case accountModifications = "AccountModifications"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeAccountRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DescribeAccountResult: AWSDecodableShape {
        /// The IP address range, specified as an IPv4 CIDR block, used for the management network interface. The management network interface is connected to a secure Amazon WorkSpaces management network. It is used for interactive streaming of the WorkSpace desktop to Amazon WorkSpaces clients, and to allow Amazon WorkSpaces to manage the WorkSpace.
        public let dedicatedTenancyManagementCidrRange: String?
        /// The status of BYOL (whether BYOL is enabled or disabled).
        public let dedicatedTenancySupport: DedicatedTenancySupportResultEnum?

        public init(dedicatedTenancyManagementCidrRange: String? = nil, dedicatedTenancySupport: DedicatedTenancySupportResultEnum? = nil) {
            self.dedicatedTenancyManagementCidrRange = dedicatedTenancyManagementCidrRange
            self.dedicatedTenancySupport = dedicatedTenancySupport
        }

        private enum CodingKeys: String, CodingKey {
            case dedicatedTenancyManagementCidrRange = "DedicatedTenancyManagementCidrRange"
            case dedicatedTenancySupport = "DedicatedTenancySupport"
        }
    }

    public struct DescribeClientPropertiesRequest: AWSEncodableShape {
        /// The resource identifier, in the form of directory IDs.
        public let resourceIds: [String]

        public init(resourceIds: [String]) {
            self.resourceIds = resourceIds
        }

        public func validate(name: String) throws {
            try self.resourceIds.forEach {
                try validate($0, name: "resourceIds[]", parent: name, min: 1)
            }
            try self.validate(self.resourceIds, name: "resourceIds", parent: name, max: 25)
            try self.validate(self.resourceIds, name: "resourceIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceIds = "ResourceIds"
        }
    }

    public struct DescribeClientPropertiesResult: AWSDecodableShape {
        /// Information about the specified Amazon WorkSpaces clients.
        public let clientPropertiesList: [ClientPropertiesResult]?

        public init(clientPropertiesList: [ClientPropertiesResult]? = nil) {
            self.clientPropertiesList = clientPropertiesList
        }

        private enum CodingKeys: String, CodingKey {
            case clientPropertiesList = "ClientPropertiesList"
        }
    }

    public struct DescribeConnectionAliasPermissionsRequest: AWSEncodableShape {
        /// The identifier of the connection alias.
        public let aliasId: String
        /// The maximum number of results to return.
        public let maxResults: Int?
        /// If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.
        public let nextToken: String?

        public init(aliasId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.aliasId = aliasId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.aliasId, name: "aliasId", parent: name, max: 68)
            try self.validate(self.aliasId, name: "aliasId", parent: name, min: 13)
            try self.validate(self.aliasId, name: "aliasId", parent: name, pattern: "^wsca-[0-9a-z]{8,63}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 25)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case aliasId = "AliasId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeConnectionAliasPermissionsResult: AWSDecodableShape {
        /// The identifier of the connection alias.
        public let aliasId: String?
        /// The permissions associated with a connection alias.
        public let connectionAliasPermissions: [ConnectionAliasPermission]?
        /// The token to use to retrieve the next set of results, or null if no more results are available.
        public let nextToken: String?

        public init(aliasId: String? = nil, connectionAliasPermissions: [ConnectionAliasPermission]? = nil, nextToken: String? = nil) {
            self.aliasId = aliasId
            self.connectionAliasPermissions = connectionAliasPermissions
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case aliasId = "AliasId"
            case connectionAliasPermissions = "ConnectionAliasPermissions"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeConnectionAliasesRequest: AWSEncodableShape {
        /// The identifiers of the connection aliases to describe.
        public let aliasIds: [String]?
        /// The maximum number of connection aliases to return.
        public let limit: Int?
        /// If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.
        public let nextToken: String?
        /// The identifier of the directory associated with the connection alias.
        public let resourceId: String?

        public init(aliasIds: [String]? = nil, limit: Int? = nil, nextToken: String? = nil, resourceId: String? = nil) {
            self.aliasIds = aliasIds
            self.limit = limit
            self.nextToken = nextToken
            self.resourceId = resourceId
        }

        public func validate(name: String) throws {
            try self.aliasIds?.forEach {
                try validate($0, name: "aliasIds[]", parent: name, max: 68)
                try validate($0, name: "aliasIds[]", parent: name, min: 13)
                try validate($0, name: "aliasIds[]", parent: name, pattern: "^wsca-[0-9a-z]{8,63}$")
            }
            try self.validate(self.aliasIds, name: "aliasIds", parent: name, max: 25)
            try self.validate(self.aliasIds, name: "aliasIds", parent: name, min: 1)
            try self.validate(self.limit, name: "limit", parent: name, max: 25)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case aliasIds = "AliasIds"
            case limit = "Limit"
            case nextToken = "NextToken"
            case resourceId = "ResourceId"
        }
    }

    public struct DescribeConnectionAliasesResult: AWSDecodableShape {
        /// Information about the specified connection aliases.
        public let connectionAliases: [ConnectionAlias]?
        /// The token to use to retrieve the next set of results, or null if no more results are available.
        public let nextToken: String?

        public init(connectionAliases: [ConnectionAlias]? = nil, nextToken: String? = nil) {
            self.connectionAliases = connectionAliases
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case connectionAliases = "ConnectionAliases"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeIpGroupsRequest: AWSEncodableShape {
        /// The identifiers of one or more IP access control groups.
        public let groupIds: [String]?
        /// The maximum number of items to return.
        public let maxResults: Int?
        /// If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.
        public let nextToken: String?

        public init(groupIds: [String]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.groupIds = groupIds
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.groupIds?.forEach {
                try validate($0, name: "groupIds[]", parent: name, pattern: "wsipg-[0-9a-z]{8,63}$")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 25)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case groupIds = "GroupIds"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeIpGroupsResult: AWSDecodableShape {
        /// The token to use to retrieve the next set of results, or null if no more results are available.
        public let nextToken: String?
        /// Information about the IP access control groups.
        public let result: [WorkspacesIpGroup]?

        public init(nextToken: String? = nil, result: [WorkspacesIpGroup]? = nil) {
            self.nextToken = nextToken
            self.result = result
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case result = "Result"
        }
    }

    public struct DescribeTagsRequest: AWSEncodableShape {
        /// The identifier of the WorkSpaces resource. The supported resource types are WorkSpaces, registered directories, images, custom bundles, IP access control groups, and connection aliases.
        public let resourceId: String

        public init(resourceId: String) {
            self.resourceId = resourceId
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceId = "ResourceId"
        }
    }

    public struct DescribeTagsResult: AWSDecodableShape {
        /// The tags.
        public let tagList: [Tag]?

        public init(tagList: [Tag]? = nil) {
            self.tagList = tagList
        }

        private enum CodingKeys: String, CodingKey {
            case tagList = "TagList"
        }
    }

    public struct DescribeWorkspaceBundlesRequest: AWSEncodableShape {
        /// The identifiers of the bundles. You cannot combine this parameter with any other filter.
        public let bundleIds: [String]?
        /// The token for the next set of results. (You received this token from a previous call.)
        public let nextToken: String?
        /// The owner of the bundles. You cannot combine this parameter with any other filter. Specify AMAZON to describe the bundles provided by AWS or null to describe the bundles that belong to your account.
        public let owner: String?

        public init(bundleIds: [String]? = nil, nextToken: String? = nil, owner: String? = nil) {
            self.bundleIds = bundleIds
            self.nextToken = nextToken
            self.owner = owner
        }

        public func validate(name: String) throws {
            try self.bundleIds?.forEach {
                try validate($0, name: "bundleIds[]", parent: name, pattern: "^wsb-[0-9a-z]{8,63}$")
            }
            try self.validate(self.bundleIds, name: "bundleIds", parent: name, max: 25)
            try self.validate(self.bundleIds, name: "bundleIds", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case bundleIds = "BundleIds"
            case nextToken = "NextToken"
            case owner = "Owner"
        }
    }

    public struct DescribeWorkspaceBundlesResult: AWSDecodableShape {
        /// Information about the bundles.
        public let bundles: [WorkspaceBundle]?
        /// The token to use to retrieve the next set of results, or null if there are no more results available. This token is valid for one day and must be used within that time frame.
        public let nextToken: String?

        public init(bundles: [WorkspaceBundle]? = nil, nextToken: String? = nil) {
            self.bundles = bundles
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case bundles = "Bundles"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeWorkspaceDirectoriesRequest: AWSEncodableShape {
        /// The identifiers of the directories. If the value is null, all directories are retrieved.
        public let directoryIds: [String]?
        /// The maximum number of directories to return.
        public let limit: Int?
        /// If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.
        public let nextToken: String?

        public init(directoryIds: [String]? = nil, limit: Int? = nil, nextToken: String? = nil) {
            self.directoryIds = directoryIds
            self.limit = limit
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.directoryIds?.forEach {
                try validate($0, name: "directoryIds[]", parent: name, max: 65)
                try validate($0, name: "directoryIds[]", parent: name, min: 10)
                try validate($0, name: "directoryIds[]", parent: name, pattern: "^d-[0-9a-f]{8,63}$")
            }
            try self.validate(self.directoryIds, name: "directoryIds", parent: name, max: 25)
            try self.validate(self.directoryIds, name: "directoryIds", parent: name, min: 1)
            try self.validate(self.limit, name: "limit", parent: name, max: 25)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case directoryIds = "DirectoryIds"
            case limit = "Limit"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeWorkspaceDirectoriesResult: AWSDecodableShape {
        /// Information about the directories.
        public let directories: [WorkspaceDirectory]?
        /// The token to use to retrieve the next set of results, or null if no more results are available.
        public let nextToken: String?

        public init(directories: [WorkspaceDirectory]? = nil, nextToken: String? = nil) {
            self.directories = directories
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case directories = "Directories"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeWorkspaceImagePermissionsRequest: AWSEncodableShape {
        /// The identifier of the image.
        public let imageId: String
        /// The maximum number of items to return.
        public let maxResults: Int?
        /// If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.
        public let nextToken: String?

        public init(imageId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.imageId = imageId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.imageId, name: "imageId", parent: name, pattern: "wsi-[0-9a-z]{9,63}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 25)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case imageId = "ImageId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeWorkspaceImagePermissionsResult: AWSDecodableShape {
        /// The identifier of the image.
        public let imageId: String?
        /// The identifiers of the AWS accounts that the image has been shared with.
        public let imagePermissions: [ImagePermission]?
        /// The token to use to retrieve the next set of results, or null if no more results are available.
        public let nextToken: String?

        public init(imageId: String? = nil, imagePermissions: [ImagePermission]? = nil, nextToken: String? = nil) {
            self.imageId = imageId
            self.imagePermissions = imagePermissions
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case imageId = "ImageId"
            case imagePermissions = "ImagePermissions"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeWorkspaceImagesRequest: AWSEncodableShape {
        /// The identifier of the image.
        public let imageIds: [String]?
        /// The type (owned or shared) of the image.
        public let imageType: ImageType?
        /// The maximum number of items to return.
        public let maxResults: Int?
        /// If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.
        public let nextToken: String?

        public init(imageIds: [String]? = nil, imageType: ImageType? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.imageIds = imageIds
            self.imageType = imageType
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.imageIds?.forEach {
                try validate($0, name: "imageIds[]", parent: name, pattern: "wsi-[0-9a-z]{9,63}$")
            }
            try self.validate(self.imageIds, name: "imageIds", parent: name, max: 25)
            try self.validate(self.imageIds, name: "imageIds", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 25)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case imageIds = "ImageIds"
            case imageType = "ImageType"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeWorkspaceImagesResult: AWSDecodableShape {
        /// Information about the images.
        public let images: [WorkspaceImage]?
        /// The token to use to retrieve the next set of results, or null if no more results are available.
        public let nextToken: String?

        public init(images: [WorkspaceImage]? = nil, nextToken: String? = nil) {
            self.images = images
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case images = "Images"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeWorkspaceSnapshotsRequest: AWSEncodableShape {
        /// The identifier of the WorkSpace.
        public let workspaceId: String

        public init(workspaceId: String) {
            self.workspaceId = workspaceId
        }

        public func validate(name: String) throws {
            try self.validate(self.workspaceId, name: "workspaceId", parent: name, pattern: "^ws-[0-9a-z]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case workspaceId = "WorkspaceId"
        }
    }

    public struct DescribeWorkspaceSnapshotsResult: AWSDecodableShape {
        /// Information about the snapshots that can be used to rebuild a WorkSpace. These snapshots include the user volume.
        public let rebuildSnapshots: [Snapshot]?
        /// Information about the snapshots that can be used to restore a WorkSpace. These snapshots include both the root volume and the user volume.
        public let restoreSnapshots: [Snapshot]?

        public init(rebuildSnapshots: [Snapshot]? = nil, restoreSnapshots: [Snapshot]? = nil) {
            self.rebuildSnapshots = rebuildSnapshots
            self.restoreSnapshots = restoreSnapshots
        }

        private enum CodingKeys: String, CodingKey {
            case rebuildSnapshots = "RebuildSnapshots"
            case restoreSnapshots = "RestoreSnapshots"
        }
    }

    public struct DescribeWorkspacesConnectionStatusRequest: AWSEncodableShape {
        /// If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.
        public let nextToken: String?
        /// The identifiers of the WorkSpaces. You can specify up to 25 WorkSpaces.
        public let workspaceIds: [String]?

        public init(nextToken: String? = nil, workspaceIds: [String]? = nil) {
            self.nextToken = nextToken
            self.workspaceIds = workspaceIds
        }

        public func validate(name: String) throws {
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.workspaceIds?.forEach {
                try validate($0, name: "workspaceIds[]", parent: name, pattern: "^ws-[0-9a-z]{8,63}$")
            }
            try self.validate(self.workspaceIds, name: "workspaceIds", parent: name, max: 25)
            try self.validate(self.workspaceIds, name: "workspaceIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case workspaceIds = "WorkspaceIds"
        }
    }

    public struct DescribeWorkspacesConnectionStatusResult: AWSDecodableShape {
        /// The token to use to retrieve the next set of results, or null if no more results are available.
        public let nextToken: String?
        /// Information about the connection status of the WorkSpace.
        public let workspacesConnectionStatus: [WorkspaceConnectionStatus]?

        public init(nextToken: String? = nil, workspacesConnectionStatus: [WorkspaceConnectionStatus]? = nil) {
            self.nextToken = nextToken
            self.workspacesConnectionStatus = workspacesConnectionStatus
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case workspacesConnectionStatus = "WorkspacesConnectionStatus"
        }
    }

    public struct DescribeWorkspacesRequest: AWSEncodableShape {
        /// The identifier of the bundle. All WorkSpaces that are created from this bundle are retrieved. You cannot combine this parameter with any other filter.
        public let bundleId: String?
        /// The identifier of the directory. In addition, you can optionally specify a specific directory user (see UserName). You cannot combine this parameter with any other filter.
        public let directoryId: String?
        /// The maximum number of items to return.
        public let limit: Int?
        /// If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.
        public let nextToken: String?
        /// The name of the directory user. You must specify this parameter with DirectoryId.
        public let userName: String?
        /// The identifiers of the WorkSpaces. You cannot combine this parameter with any other filter. Because the CreateWorkspaces operation is asynchronous, the identifier it returns is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information is returned.
        public let workspaceIds: [String]?

        public init(bundleId: String? = nil, directoryId: String? = nil, limit: Int? = nil, nextToken: String? = nil, userName: String? = nil, workspaceIds: [String]? = nil) {
            self.bundleId = bundleId
            self.directoryId = directoryId
            self.limit = limit
            self.nextToken = nextToken
            self.userName = userName
            self.workspaceIds = workspaceIds
        }

        public func validate(name: String) throws {
            try self.validate(self.bundleId, name: "bundleId", parent: name, pattern: "^wsb-[0-9a-z]{8,63}$")
            try self.validate(self.directoryId, name: "directoryId", parent: name, max: 65)
            try self.validate(self.directoryId, name: "directoryId", parent: name, min: 10)
            try self.validate(self.directoryId, name: "directoryId", parent: name, pattern: "^d-[0-9a-f]{8,63}$")
            try self.validate(self.limit, name: "limit", parent: name, max: 25)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.userName, name: "userName", parent: name, max: 63)
            try self.validate(self.userName, name: "userName", parent: name, min: 1)
            try self.workspaceIds?.forEach {
                try validate($0, name: "workspaceIds[]", parent: name, pattern: "^ws-[0-9a-z]{8,63}$")
            }
            try self.validate(self.workspaceIds, name: "workspaceIds", parent: name, max: 25)
            try self.validate(self.workspaceIds, name: "workspaceIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case bundleId = "BundleId"
            case directoryId = "DirectoryId"
            case limit = "Limit"
            case nextToken = "NextToken"
            case userName = "UserName"
            case workspaceIds = "WorkspaceIds"
        }
    }

    public struct DescribeWorkspacesResult: AWSDecodableShape {
        /// The token to use to retrieve the next set of results, or null if no more results are available.
        public let nextToken: String?
        /// Information about the WorkSpaces. Because CreateWorkspaces is an asynchronous operation, some of the returned information could be incomplete.
        public let workspaces: [Workspace]?

        public init(nextToken: String? = nil, workspaces: [Workspace]? = nil) {
            self.nextToken = nextToken
            self.workspaces = workspaces
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case workspaces = "Workspaces"
        }
    }

    public struct DisassociateConnectionAliasRequest: AWSEncodableShape {
        /// The identifier of the connection alias to disassociate.
        public let aliasId: String

        public init(aliasId: String) {
            self.aliasId = aliasId
        }

        public func validate(name: String) throws {
            try self.validate(self.aliasId, name: "aliasId", parent: name, max: 68)
            try self.validate(self.aliasId, name: "aliasId", parent: name, min: 13)
            try self.validate(self.aliasId, name: "aliasId", parent: name, pattern: "^wsca-[0-9a-z]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case aliasId = "AliasId"
        }
    }

    public struct DisassociateConnectionAliasResult: AWSDecodableShape {
        public init() {}
    }

    public struct DisassociateIpGroupsRequest: AWSEncodableShape {
        /// The identifier of the directory.
        public let directoryId: String
        /// The identifiers of one or more IP access control groups.
        public let groupIds: [String]

        public init(directoryId: String, groupIds: [String]) {
            self.directoryId = directoryId
            self.groupIds = groupIds
        }

        public func validate(name: String) throws {
            try self.validate(self.directoryId, name: "directoryId", parent: name, max: 65)
            try self.validate(self.directoryId, name: "directoryId", parent: name, min: 10)
            try self.validate(self.directoryId, name: "directoryId", parent: name, pattern: "^d-[0-9a-f]{8,63}$")
            try self.groupIds.forEach {
                try validate($0, name: "groupIds[]", parent: name, pattern: "wsipg-[0-9a-z]{8,63}$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case directoryId = "DirectoryId"
            case groupIds = "GroupIds"
        }
    }

    public struct DisassociateIpGroupsResult: AWSDecodableShape {
        public init() {}
    }

    public struct FailedCreateWorkspaceRequest: AWSDecodableShape {
        /// The error code that is returned if the WorkSpace cannot be created.
        public let errorCode: String?
        /// The text of the error message that is returned if the WorkSpace cannot be created.
        public let errorMessage: String?
        /// Information about the WorkSpace.
        public let workspaceRequest: WorkspaceRequest?

        public init(errorCode: String? = nil, errorMessage: String? = nil, workspaceRequest: WorkspaceRequest? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.workspaceRequest = workspaceRequest
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case workspaceRequest = "WorkspaceRequest"
        }
    }

    public struct FailedWorkspaceChangeRequest: AWSDecodableShape {
        /// The error code that is returned if the WorkSpace cannot be rebooted.
        public let errorCode: String?
        /// The text of the error message that is returned if the WorkSpace cannot be rebooted.
        public let errorMessage: String?
        /// The identifier of the WorkSpace.
        public let workspaceId: String?

        public init(errorCode: String? = nil, errorMessage: String? = nil, workspaceId: String? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.workspaceId = workspaceId
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case workspaceId = "WorkspaceId"
        }
    }

    public struct ImagePermission: AWSDecodableShape {
        /// The identifier of the AWS account that an image has been shared with.
        public let sharedAccountId: String?

        public init(sharedAccountId: String? = nil) {
            self.sharedAccountId = sharedAccountId
        }

        private enum CodingKeys: String, CodingKey {
            case sharedAccountId = "SharedAccountId"
        }
    }

    public struct ImportWorkspaceImageRequest: AWSEncodableShape {
        /// If specified, the version of Microsoft Office to subscribe to. Valid only for Windows 10 BYOL images. For more information about subscribing to Office for BYOL images, see  Bring Your Own Windows Desktop Licenses.  Although this parameter is an array, only one item is allowed at this time.
        public let applications: [Application]?
        /// The identifier of the EC2 image.
        public let ec2ImageId: String
        /// The description of the WorkSpace image.
        public let imageDescription: String
        /// The name of the WorkSpace image.
        public let imageName: String
        /// The ingestion process to be used when importing the image, depending on which protocol you want to use for your BYOL Workspace image, either PCoIP or WorkSpaces Streaming Protocol (WSP). To use WSP, specify a value that ends in _WSP. To use PCoIP, specify a value that does not end in _WSP.  For non-GPU-enabled bundles (bundles other than Graphics or GraphicsPro), specify BYOL_REGULAR or BYOL_REGULAR_WSP, depending on the protocol.
        public let ingestionProcess: WorkspaceImageIngestionProcess
        /// The tags. Each WorkSpaces resource can have a maximum of 50 tags.
        public let tags: [Tag]?

        public init(applications: [Application]? = nil, ec2ImageId: String, imageDescription: String, imageName: String, ingestionProcess: WorkspaceImageIngestionProcess, tags: [Tag]? = nil) {
            self.applications = applications
            self.ec2ImageId = ec2ImageId
            self.imageDescription = imageDescription
            self.imageName = imageName
            self.ingestionProcess = ingestionProcess
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.applications, name: "applications", parent: name, max: 5)
            try self.validate(self.applications, name: "applications", parent: name, min: 1)
            try self.validate(self.ec2ImageId, name: "ec2ImageId", parent: name, pattern: "^ami\\-([a-f0-9]{8}|[a-f0-9]{17})$")
            try self.validate(self.imageDescription, name: "imageDescription", parent: name, max: 256)
            try self.validate(self.imageDescription, name: "imageDescription", parent: name, min: 1)
            try self.validate(self.imageDescription, name: "imageDescription", parent: name, pattern: "^[a-zA-Z0-9_./() -]+$")
            try self.validate(self.imageName, name: "imageName", parent: name, max: 64)
            try self.validate(self.imageName, name: "imageName", parent: name, min: 1)
            try self.validate(self.imageName, name: "imageName", parent: name, pattern: "^[a-zA-Z0-9_./()\\\\-]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case applications = "Applications"
            case ec2ImageId = "Ec2ImageId"
            case imageDescription = "ImageDescription"
            case imageName = "ImageName"
            case ingestionProcess = "IngestionProcess"
            case tags = "Tags"
        }
    }

    public struct ImportWorkspaceImageResult: AWSDecodableShape {
        /// The identifier of the WorkSpace image.
        public let imageId: String?

        public init(imageId: String? = nil) {
            self.imageId = imageId
        }

        private enum CodingKeys: String, CodingKey {
            case imageId = "ImageId"
        }
    }

    public struct IpRuleItem: AWSEncodableShape & AWSDecodableShape {
        /// The IP address range, in CIDR notation.
        public let ipRule: String?
        /// The description.
        public let ruleDesc: String?

        public init(ipRule: String? = nil, ruleDesc: String? = nil) {
            self.ipRule = ipRule
            self.ruleDesc = ruleDesc
        }

        private enum CodingKeys: String, CodingKey {
            case ipRule
            case ruleDesc
        }
    }

    public struct ListAvailableManagementCidrRangesRequest: AWSEncodableShape {
        /// The IP address range to search. Specify an IP address range that is compatible with your network and in CIDR notation (that is, specify the range as an IPv4 CIDR block).
        public let managementCidrRangeConstraint: String
        /// The maximum number of items to return.
        public let maxResults: Int?
        /// If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.
        public let nextToken: String?

        public init(managementCidrRangeConstraint: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.managementCidrRangeConstraint = managementCidrRangeConstraint
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.managementCidrRangeConstraint, name: "managementCidrRangeConstraint", parent: name, pattern: "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(3[0-2]|[1-2][0-9]|[0-9]))$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 5)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case managementCidrRangeConstraint = "ManagementCidrRangeConstraint"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListAvailableManagementCidrRangesResult: AWSDecodableShape {
        /// The list of available IP address ranges, specified as IPv4 CIDR blocks.
        public let managementCidrRanges: [String]?
        /// The token to use to retrieve the next set of results, or null if no more results are available.
        public let nextToken: String?

        public init(managementCidrRanges: [String]? = nil, nextToken: String? = nil) {
            self.managementCidrRanges = managementCidrRanges
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case managementCidrRanges = "ManagementCidrRanges"
            case nextToken = "NextToken"
        }
    }

    public struct MigrateWorkspaceRequest: AWSEncodableShape {
        /// The identifier of the target bundle type to migrate the WorkSpace to.
        public let bundleId: String
        /// The identifier of the WorkSpace to migrate from.
        public let sourceWorkspaceId: String

        public init(bundleId: String, sourceWorkspaceId: String) {
            self.bundleId = bundleId
            self.sourceWorkspaceId = sourceWorkspaceId
        }

        public func validate(name: String) throws {
            try self.validate(self.bundleId, name: "bundleId", parent: name, pattern: "^wsb-[0-9a-z]{8,63}$")
            try self.validate(self.sourceWorkspaceId, name: "sourceWorkspaceId", parent: name, pattern: "^ws-[0-9a-z]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case bundleId = "BundleId"
            case sourceWorkspaceId = "SourceWorkspaceId"
        }
    }

    public struct MigrateWorkspaceResult: AWSDecodableShape {
        /// The original identifier of the WorkSpace that is being migrated.
        public let sourceWorkspaceId: String?
        /// The new identifier of the WorkSpace that is being migrated. If the migration does not succeed, the target WorkSpace ID will not be used, and the WorkSpace will still have the original WorkSpace ID.
        public let targetWorkspaceId: String?

        public init(sourceWorkspaceId: String? = nil, targetWorkspaceId: String? = nil) {
            self.sourceWorkspaceId = sourceWorkspaceId
            self.targetWorkspaceId = targetWorkspaceId
        }

        private enum CodingKeys: String, CodingKey {
            case sourceWorkspaceId = "SourceWorkspaceId"
            case targetWorkspaceId = "TargetWorkspaceId"
        }
    }

    public struct ModificationState: AWSDecodableShape {
        /// The resource.
        public let resource: ModificationResourceEnum?
        /// The modification state.
        public let state: ModificationStateEnum?

        public init(resource: ModificationResourceEnum? = nil, state: ModificationStateEnum? = nil) {
            self.resource = resource
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case resource = "Resource"
            case state = "State"
        }
    }

    public struct ModifyAccountRequest: AWSEncodableShape {
        /// The IP address range, specified as an IPv4 CIDR block, for the management network interface. Specify an IP address range that is compatible with your network and in CIDR notation (that is, specify the range as an IPv4 CIDR block). The CIDR block size must be /16 (for example, 203.0.113.25/16). It must also be specified as available by the ListAvailableManagementCidrRanges operation.
        public let dedicatedTenancyManagementCidrRange: String?
        /// The status of BYOL.
        public let dedicatedTenancySupport: DedicatedTenancySupportEnum?

        public init(dedicatedTenancyManagementCidrRange: String? = nil, dedicatedTenancySupport: DedicatedTenancySupportEnum? = nil) {
            self.dedicatedTenancyManagementCidrRange = dedicatedTenancyManagementCidrRange
            self.dedicatedTenancySupport = dedicatedTenancySupport
        }

        public func validate(name: String) throws {
            try self.validate(self.dedicatedTenancyManagementCidrRange, name: "dedicatedTenancyManagementCidrRange", parent: name, pattern: "(^([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.0\\.0)(\\/(16$))$")
        }

        private enum CodingKeys: String, CodingKey {
            case dedicatedTenancyManagementCidrRange = "DedicatedTenancyManagementCidrRange"
            case dedicatedTenancySupport = "DedicatedTenancySupport"
        }
    }

    public struct ModifyAccountResult: AWSDecodableShape {
        public init() {}
    }

    public struct ModifyClientPropertiesRequest: AWSEncodableShape {
        /// Information about the Amazon WorkSpaces client.
        public let clientProperties: ClientProperties
        /// The resource identifiers, in the form of directory IDs.
        public let resourceId: String

        public init(clientProperties: ClientProperties, resourceId: String) {
            self.clientProperties = clientProperties
            self.resourceId = resourceId
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientProperties = "ClientProperties"
            case resourceId = "ResourceId"
        }
    }

    public struct ModifyClientPropertiesResult: AWSDecodableShape {
        public init() {}
    }

    public struct ModifySelfservicePermissionsRequest: AWSEncodableShape {
        /// The identifier of the directory.
        public let resourceId: String
        /// The permissions to enable or disable self-service capabilities.
        public let selfservicePermissions: SelfservicePermissions

        public init(resourceId: String, selfservicePermissions: SelfservicePermissions) {
            self.resourceId = resourceId
            self.selfservicePermissions = selfservicePermissions
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 65)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 10)
            try self.validate(self.resourceId, name: "resourceId", parent: name, pattern: "^d-[0-9a-f]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceId = "ResourceId"
            case selfservicePermissions = "SelfservicePermissions"
        }
    }

    public struct ModifySelfservicePermissionsResult: AWSDecodableShape {
        public init() {}
    }

    public struct ModifyWorkspaceAccessPropertiesRequest: AWSEncodableShape {
        /// The identifier of the directory.
        public let resourceId: String
        /// The device types and operating systems to enable or disable for access.
        public let workspaceAccessProperties: WorkspaceAccessProperties

        public init(resourceId: String, workspaceAccessProperties: WorkspaceAccessProperties) {
            self.resourceId = resourceId
            self.workspaceAccessProperties = workspaceAccessProperties
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 65)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 10)
            try self.validate(self.resourceId, name: "resourceId", parent: name, pattern: "^d-[0-9a-f]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceId = "ResourceId"
            case workspaceAccessProperties = "WorkspaceAccessProperties"
        }
    }

    public struct ModifyWorkspaceAccessPropertiesResult: AWSDecodableShape {
        public init() {}
    }

    public struct ModifyWorkspaceCreationPropertiesRequest: AWSEncodableShape {
        /// The identifier of the directory.
        public let resourceId: String
        /// The default properties for creating WorkSpaces.
        public let workspaceCreationProperties: WorkspaceCreationProperties

        public init(resourceId: String, workspaceCreationProperties: WorkspaceCreationProperties) {
            self.resourceId = resourceId
            self.workspaceCreationProperties = workspaceCreationProperties
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 65)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 10)
            try self.validate(self.resourceId, name: "resourceId", parent: name, pattern: "^d-[0-9a-f]{8,63}$")
            try self.workspaceCreationProperties.validate(name: "\(name).workspaceCreationProperties")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceId = "ResourceId"
            case workspaceCreationProperties = "WorkspaceCreationProperties"
        }
    }

    public struct ModifyWorkspaceCreationPropertiesResult: AWSDecodableShape {
        public init() {}
    }

    public struct ModifyWorkspacePropertiesRequest: AWSEncodableShape {
        /// The identifier of the WorkSpace.
        public let workspaceId: String
        /// The properties of the WorkSpace.
        public let workspaceProperties: WorkspaceProperties

        public init(workspaceId: String, workspaceProperties: WorkspaceProperties) {
            self.workspaceId = workspaceId
            self.workspaceProperties = workspaceProperties
        }

        public func validate(name: String) throws {
            try self.validate(self.workspaceId, name: "workspaceId", parent: name, pattern: "^ws-[0-9a-z]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case workspaceId = "WorkspaceId"
            case workspaceProperties = "WorkspaceProperties"
        }
    }

    public struct ModifyWorkspacePropertiesResult: AWSDecodableShape {
        public init() {}
    }

    public struct ModifyWorkspaceStateRequest: AWSEncodableShape {
        /// The identifier of the WorkSpace.
        public let workspaceId: String
        /// The WorkSpace state.
        public let workspaceState: TargetWorkspaceState

        public init(workspaceId: String, workspaceState: TargetWorkspaceState) {
            self.workspaceId = workspaceId
            self.workspaceState = workspaceState
        }

        public func validate(name: String) throws {
            try self.validate(self.workspaceId, name: "workspaceId", parent: name, pattern: "^ws-[0-9a-z]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case workspaceId = "WorkspaceId"
            case workspaceState = "WorkspaceState"
        }
    }

    public struct ModifyWorkspaceStateResult: AWSDecodableShape {
        public init() {}
    }

    public struct OperatingSystem: AWSDecodableShape {
        /// The operating system.
        public let type: OperatingSystemType?

        public init(type: OperatingSystemType? = nil) {
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case type = "Type"
        }
    }

    public struct RebootRequest: AWSEncodableShape {
        /// The identifier of the WorkSpace.
        public let workspaceId: String

        public init(workspaceId: String) {
            self.workspaceId = workspaceId
        }

        public func validate(name: String) throws {
            try self.validate(self.workspaceId, name: "workspaceId", parent: name, pattern: "^ws-[0-9a-z]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case workspaceId = "WorkspaceId"
        }
    }

    public struct RebootWorkspacesRequest: AWSEncodableShape {
        /// The WorkSpaces to reboot. You can specify up to 25 WorkSpaces.
        public let rebootWorkspaceRequests: [RebootRequest]

        public init(rebootWorkspaceRequests: [RebootRequest]) {
            self.rebootWorkspaceRequests = rebootWorkspaceRequests
        }

        public func validate(name: String) throws {
            try self.rebootWorkspaceRequests.forEach {
                try $0.validate(name: "\(name).rebootWorkspaceRequests[]")
            }
            try self.validate(self.rebootWorkspaceRequests, name: "rebootWorkspaceRequests", parent: name, max: 25)
            try self.validate(self.rebootWorkspaceRequests, name: "rebootWorkspaceRequests", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case rebootWorkspaceRequests = "RebootWorkspaceRequests"
        }
    }

    public struct RebootWorkspacesResult: AWSDecodableShape {
        /// Information about the WorkSpaces that could not be rebooted.
        public let failedRequests: [FailedWorkspaceChangeRequest]?

        public init(failedRequests: [FailedWorkspaceChangeRequest]? = nil) {
            self.failedRequests = failedRequests
        }

        private enum CodingKeys: String, CodingKey {
            case failedRequests = "FailedRequests"
        }
    }

    public struct RebuildRequest: AWSEncodableShape {
        /// The identifier of the WorkSpace.
        public let workspaceId: String

        public init(workspaceId: String) {
            self.workspaceId = workspaceId
        }

        public func validate(name: String) throws {
            try self.validate(self.workspaceId, name: "workspaceId", parent: name, pattern: "^ws-[0-9a-z]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case workspaceId = "WorkspaceId"
        }
    }

    public struct RebuildWorkspacesRequest: AWSEncodableShape {
        /// The WorkSpace to rebuild. You can specify a single WorkSpace.
        public let rebuildWorkspaceRequests: [RebuildRequest]

        public init(rebuildWorkspaceRequests: [RebuildRequest]) {
            self.rebuildWorkspaceRequests = rebuildWorkspaceRequests
        }

        public func validate(name: String) throws {
            try self.rebuildWorkspaceRequests.forEach {
                try $0.validate(name: "\(name).rebuildWorkspaceRequests[]")
            }
            try self.validate(self.rebuildWorkspaceRequests, name: "rebuildWorkspaceRequests", parent: name, max: 1)
            try self.validate(self.rebuildWorkspaceRequests, name: "rebuildWorkspaceRequests", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case rebuildWorkspaceRequests = "RebuildWorkspaceRequests"
        }
    }

    public struct RebuildWorkspacesResult: AWSDecodableShape {
        /// Information about the WorkSpace that could not be rebuilt.
        public let failedRequests: [FailedWorkspaceChangeRequest]?

        public init(failedRequests: [FailedWorkspaceChangeRequest]? = nil) {
            self.failedRequests = failedRequests
        }

        private enum CodingKeys: String, CodingKey {
            case failedRequests = "FailedRequests"
        }
    }

    public struct RegisterWorkspaceDirectoryRequest: AWSEncodableShape {
        /// The identifier of the directory. You cannot register a directory if it does not have a status of Active. If the directory does not have a status of Active, you will receive an InvalidResourceStateException error. If you have already registered the maximum number of directories that you can register with Amazon WorkSpaces, you will receive a ResourceLimitExceededException error. Deregister directories that you are not using for WorkSpaces, and try again.
        public let directoryId: String
        /// Indicates whether self-service capabilities are enabled or disabled.
        public let enableSelfService: Bool?
        /// Indicates whether Amazon WorkDocs is enabled or disabled. If you have enabled this parameter and WorkDocs is not available in the Region, you will receive an OperationNotSupportedException error. Set EnableWorkDocs to disabled, and try again.
        public let enableWorkDocs: Bool
        /// The identifiers of the subnets for your virtual private cloud (VPC). Make sure that the subnets are in supported Availability Zones. The subnets must also be in separate Availability Zones. If these conditions are not met, you will receive an OperationNotSupportedException error.
        public let subnetIds: [String]?
        /// The tags associated with the directory.
        public let tags: [Tag]?
        /// Indicates whether your WorkSpace directory is dedicated or shared. To use Bring Your Own License (BYOL) images, this value must be set to DEDICATED and your AWS account must be enabled for BYOL. If your account has not been enabled for BYOL, you will receive an InvalidParameterValuesException error. For more information about BYOL images, see Bring Your Own Windows Desktop Images.
        public let tenancy: Tenancy?

        public init(directoryId: String, enableSelfService: Bool? = nil, enableWorkDocs: Bool, subnetIds: [String]? = nil, tags: [Tag]? = nil, tenancy: Tenancy? = nil) {
            self.directoryId = directoryId
            self.enableSelfService = enableSelfService
            self.enableWorkDocs = enableWorkDocs
            self.subnetIds = subnetIds
            self.tags = tags
            self.tenancy = tenancy
        }

        public func validate(name: String) throws {
            try self.validate(self.directoryId, name: "directoryId", parent: name, max: 65)
            try self.validate(self.directoryId, name: "directoryId", parent: name, min: 10)
            try self.validate(self.directoryId, name: "directoryId", parent: name, pattern: "^d-[0-9a-f]{8,63}$")
            try self.subnetIds?.forEach {
                try validate($0, name: "subnetIds[]", parent: name, max: 24)
                try validate($0, name: "subnetIds[]", parent: name, min: 15)
                try validate($0, name: "subnetIds[]", parent: name, pattern: "^(subnet-([0-9a-f]{8}|[0-9a-f]{17}))$")
            }
            try self.validate(self.subnetIds, name: "subnetIds", parent: name, max: 2)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case directoryId = "DirectoryId"
            case enableSelfService = "EnableSelfService"
            case enableWorkDocs = "EnableWorkDocs"
            case subnetIds = "SubnetIds"
            case tags = "Tags"
            case tenancy = "Tenancy"
        }
    }

    public struct RegisterWorkspaceDirectoryResult: AWSDecodableShape {
        public init() {}
    }

    public struct RestoreWorkspaceRequest: AWSEncodableShape {
        /// The identifier of the WorkSpace.
        public let workspaceId: String

        public init(workspaceId: String) {
            self.workspaceId = workspaceId
        }

        public func validate(name: String) throws {
            try self.validate(self.workspaceId, name: "workspaceId", parent: name, pattern: "^ws-[0-9a-z]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case workspaceId = "WorkspaceId"
        }
    }

    public struct RestoreWorkspaceResult: AWSDecodableShape {
        public init() {}
    }

    public struct RevokeIpRulesRequest: AWSEncodableShape {
        /// The identifier of the group.
        public let groupId: String
        /// The rules to remove from the group.
        public let userRules: [String]

        public init(groupId: String, userRules: [String]) {
            self.groupId = groupId
            self.userRules = userRules
        }

        public func validate(name: String) throws {
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "wsipg-[0-9a-z]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
            case userRules = "UserRules"
        }
    }

    public struct RevokeIpRulesResult: AWSDecodableShape {
        public init() {}
    }

    public struct RootStorage: AWSDecodableShape {
        /// The size of the root volume.
        public let capacity: String?

        public init(capacity: String? = nil) {
            self.capacity = capacity
        }

        private enum CodingKeys: String, CodingKey {
            case capacity = "Capacity"
        }
    }

    public struct SelfservicePermissions: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether users can change the compute type (bundle) for their WorkSpace.
        public let changeComputeType: ReconnectEnum?
        /// Specifies whether users can increase the volume size of the drives on their WorkSpace.
        public let increaseVolumeSize: ReconnectEnum?
        /// Specifies whether users can rebuild the operating system of a WorkSpace to its original state.
        public let rebuildWorkspace: ReconnectEnum?
        /// Specifies whether users can restart their WorkSpace.
        public let restartWorkspace: ReconnectEnum?
        /// Specifies whether users can switch the running mode of their WorkSpace.
        public let switchRunningMode: ReconnectEnum?

        public init(changeComputeType: ReconnectEnum? = nil, increaseVolumeSize: ReconnectEnum? = nil, rebuildWorkspace: ReconnectEnum? = nil, restartWorkspace: ReconnectEnum? = nil, switchRunningMode: ReconnectEnum? = nil) {
            self.changeComputeType = changeComputeType
            self.increaseVolumeSize = increaseVolumeSize
            self.rebuildWorkspace = rebuildWorkspace
            self.restartWorkspace = restartWorkspace
            self.switchRunningMode = switchRunningMode
        }

        private enum CodingKeys: String, CodingKey {
            case changeComputeType = "ChangeComputeType"
            case increaseVolumeSize = "IncreaseVolumeSize"
            case rebuildWorkspace = "RebuildWorkspace"
            case restartWorkspace = "RestartWorkspace"
            case switchRunningMode = "SwitchRunningMode"
        }
    }

    public struct Snapshot: AWSDecodableShape {
        /// The time when the snapshot was created.
        public let snapshotTime: Date?

        public init(snapshotTime: Date? = nil) {
            self.snapshotTime = snapshotTime
        }

        private enum CodingKeys: String, CodingKey {
            case snapshotTime = "SnapshotTime"
        }
    }

    public struct StartRequest: AWSEncodableShape {
        /// The identifier of the WorkSpace.
        public let workspaceId: String?

        public init(workspaceId: String? = nil) {
            self.workspaceId = workspaceId
        }

        public func validate(name: String) throws {
            try self.validate(self.workspaceId, name: "workspaceId", parent: name, pattern: "^ws-[0-9a-z]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case workspaceId = "WorkspaceId"
        }
    }

    public struct StartWorkspacesRequest: AWSEncodableShape {
        /// The WorkSpaces to start. You can specify up to 25 WorkSpaces.
        public let startWorkspaceRequests: [StartRequest]

        public init(startWorkspaceRequests: [StartRequest]) {
            self.startWorkspaceRequests = startWorkspaceRequests
        }

        public func validate(name: String) throws {
            try self.startWorkspaceRequests.forEach {
                try $0.validate(name: "\(name).startWorkspaceRequests[]")
            }
            try self.validate(self.startWorkspaceRequests, name: "startWorkspaceRequests", parent: name, max: 25)
            try self.validate(self.startWorkspaceRequests, name: "startWorkspaceRequests", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case startWorkspaceRequests = "StartWorkspaceRequests"
        }
    }

    public struct StartWorkspacesResult: AWSDecodableShape {
        /// Information about the WorkSpaces that could not be started.
        public let failedRequests: [FailedWorkspaceChangeRequest]?

        public init(failedRequests: [FailedWorkspaceChangeRequest]? = nil) {
            self.failedRequests = failedRequests
        }

        private enum CodingKeys: String, CodingKey {
            case failedRequests = "FailedRequests"
        }
    }

    public struct StopRequest: AWSEncodableShape {
        /// The identifier of the WorkSpace.
        public let workspaceId: String?

        public init(workspaceId: String? = nil) {
            self.workspaceId = workspaceId
        }

        public func validate(name: String) throws {
            try self.validate(self.workspaceId, name: "workspaceId", parent: name, pattern: "^ws-[0-9a-z]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case workspaceId = "WorkspaceId"
        }
    }

    public struct StopWorkspacesRequest: AWSEncodableShape {
        /// The WorkSpaces to stop. You can specify up to 25 WorkSpaces.
        public let stopWorkspaceRequests: [StopRequest]

        public init(stopWorkspaceRequests: [StopRequest]) {
            self.stopWorkspaceRequests = stopWorkspaceRequests
        }

        public func validate(name: String) throws {
            try self.stopWorkspaceRequests.forEach {
                try $0.validate(name: "\(name).stopWorkspaceRequests[]")
            }
            try self.validate(self.stopWorkspaceRequests, name: "stopWorkspaceRequests", parent: name, max: 25)
            try self.validate(self.stopWorkspaceRequests, name: "stopWorkspaceRequests", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case stopWorkspaceRequests = "StopWorkspaceRequests"
        }
    }

    public struct StopWorkspacesResult: AWSDecodableShape {
        /// Information about the WorkSpaces that could not be stopped.
        public let failedRequests: [FailedWorkspaceChangeRequest]?

        public init(failedRequests: [FailedWorkspaceChangeRequest]? = nil) {
            self.failedRequests = failedRequests
        }

        private enum CodingKeys: String, CodingKey {
            case failedRequests = "FailedRequests"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The key of the tag.
        public let key: String
        /// The value of the tag.
        public let value: String?

        public init(key: String, value: String? = nil) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 127)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 255)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TerminateRequest: AWSEncodableShape {
        /// The identifier of the WorkSpace.
        public let workspaceId: String

        public init(workspaceId: String) {
            self.workspaceId = workspaceId
        }

        public func validate(name: String) throws {
            try self.validate(self.workspaceId, name: "workspaceId", parent: name, pattern: "^ws-[0-9a-z]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case workspaceId = "WorkspaceId"
        }
    }

    public struct TerminateWorkspacesRequest: AWSEncodableShape {
        /// The WorkSpaces to terminate. You can specify up to 25 WorkSpaces.
        public let terminateWorkspaceRequests: [TerminateRequest]

        public init(terminateWorkspaceRequests: [TerminateRequest]) {
            self.terminateWorkspaceRequests = terminateWorkspaceRequests
        }

        public func validate(name: String) throws {
            try self.terminateWorkspaceRequests.forEach {
                try $0.validate(name: "\(name).terminateWorkspaceRequests[]")
            }
            try self.validate(self.terminateWorkspaceRequests, name: "terminateWorkspaceRequests", parent: name, max: 25)
            try self.validate(self.terminateWorkspaceRequests, name: "terminateWorkspaceRequests", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case terminateWorkspaceRequests = "TerminateWorkspaceRequests"
        }
    }

    public struct TerminateWorkspacesResult: AWSDecodableShape {
        /// Information about the WorkSpaces that could not be terminated.
        public let failedRequests: [FailedWorkspaceChangeRequest]?

        public init(failedRequests: [FailedWorkspaceChangeRequest]? = nil) {
            self.failedRequests = failedRequests
        }

        private enum CodingKeys: String, CodingKey {
            case failedRequests = "FailedRequests"
        }
    }

    public struct UpdateConnectionAliasPermissionRequest: AWSEncodableShape {
        /// The identifier of the connection alias that you want to update permissions for.
        public let aliasId: String
        /// Indicates whether to share or unshare the connection alias with the specified AWS account.
        public let connectionAliasPermission: ConnectionAliasPermission

        public init(aliasId: String, connectionAliasPermission: ConnectionAliasPermission) {
            self.aliasId = aliasId
            self.connectionAliasPermission = connectionAliasPermission
        }

        public func validate(name: String) throws {
            try self.validate(self.aliasId, name: "aliasId", parent: name, max: 68)
            try self.validate(self.aliasId, name: "aliasId", parent: name, min: 13)
            try self.validate(self.aliasId, name: "aliasId", parent: name, pattern: "^wsca-[0-9a-z]{8,63}$")
            try self.connectionAliasPermission.validate(name: "\(name).connectionAliasPermission")
        }

        private enum CodingKeys: String, CodingKey {
            case aliasId = "AliasId"
            case connectionAliasPermission = "ConnectionAliasPermission"
        }
    }

    public struct UpdateConnectionAliasPermissionResult: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateRulesOfIpGroupRequest: AWSEncodableShape {
        /// The identifier of the group.
        public let groupId: String
        /// One or more rules.
        public let userRules: [IpRuleItem]

        public init(groupId: String, userRules: [IpRuleItem]) {
            self.groupId = groupId
            self.userRules = userRules
        }

        public func validate(name: String) throws {
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "wsipg-[0-9a-z]{8,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
            case userRules = "UserRules"
        }
    }

    public struct UpdateRulesOfIpGroupResult: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateWorkspaceImagePermissionRequest: AWSEncodableShape {
        /// The permission to copy the image. This permission can be revoked only after an image has been shared.
        public let allowCopyImage: Bool
        /// The identifier of the image.
        public let imageId: String
        /// The identifier of the AWS account to share or unshare the image with.  Before sharing the image, confirm that you are sharing to the correct AWS account ID.
        public let sharedAccountId: String

        public init(allowCopyImage: Bool, imageId: String, sharedAccountId: String) {
            self.allowCopyImage = allowCopyImage
            self.imageId = imageId
            self.sharedAccountId = sharedAccountId
        }

        public func validate(name: String) throws {
            try self.validate(self.imageId, name: "imageId", parent: name, pattern: "wsi-[0-9a-z]{9,63}$")
            try self.validate(self.sharedAccountId, name: "sharedAccountId", parent: name, pattern: "^\\d{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case allowCopyImage = "AllowCopyImage"
            case imageId = "ImageId"
            case sharedAccountId = "SharedAccountId"
        }
    }

    public struct UpdateWorkspaceImagePermissionResult: AWSDecodableShape {
        public init() {}
    }

    public struct UserStorage: AWSDecodableShape {
        /// The size of the user storage.
        public let capacity: String?

        public init(capacity: String? = nil) {
            self.capacity = capacity
        }

        private enum CodingKeys: String, CodingKey {
            case capacity = "Capacity"
        }
    }

    public struct Workspace: AWSDecodableShape {
        /// The identifier of the bundle used to create the WorkSpace.
        public let bundleId: String?
        /// The name of the WorkSpace, as seen by the operating system. The format of this name varies. For more information, see  Launch a WorkSpace.
        public let computerName: String?
        /// The identifier of the AWS Directory Service directory for the WorkSpace.
        public let directoryId: String?
        /// The error code that is returned if the WorkSpace cannot be created.
        public let errorCode: String?
        /// The text of the error message that is returned if the WorkSpace cannot be created.
        public let errorMessage: String?
        /// The IP address of the WorkSpace.
        public let ipAddress: String?
        /// The modification states of the WorkSpace.
        public let modificationStates: [ModificationState]?
        /// Indicates whether the data stored on the root volume is encrypted.
        public let rootVolumeEncryptionEnabled: Bool?
        /// The operational state of the WorkSpace.  After a WorkSpace is terminated, the TERMINATED state is returned only briefly before the WorkSpace directory metadata is cleaned up, so this state is rarely returned. To confirm that a WorkSpace is terminated, check for the WorkSpace ID by using  DescribeWorkSpaces. If the WorkSpace ID isn't returned, then the WorkSpace has been successfully terminated.
        public let state: WorkspaceState?
        /// The identifier of the subnet for the WorkSpace.
        public let subnetId: String?
        /// The user for the WorkSpace.
        public let userName: String?
        /// Indicates whether the data stored on the user volume is encrypted.
        public let userVolumeEncryptionEnabled: Bool?
        /// The symmetric AWS KMS customer master key (CMK) used to encrypt data stored on your WorkSpace. Amazon WorkSpaces does not support asymmetric CMKs.
        public let volumeEncryptionKey: String?
        /// The identifier of the WorkSpace.
        public let workspaceId: String?
        /// The properties of the WorkSpace.
        public let workspaceProperties: WorkspaceProperties?

        public init(bundleId: String? = nil, computerName: String? = nil, directoryId: String? = nil, errorCode: String? = nil, errorMessage: String? = nil, ipAddress: String? = nil, modificationStates: [ModificationState]? = nil, rootVolumeEncryptionEnabled: Bool? = nil, state: WorkspaceState? = nil, subnetId: String? = nil, userName: String? = nil, userVolumeEncryptionEnabled: Bool? = nil, volumeEncryptionKey: String? = nil, workspaceId: String? = nil, workspaceProperties: WorkspaceProperties? = nil) {
            self.bundleId = bundleId
            self.computerName = computerName
            self.directoryId = directoryId
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.ipAddress = ipAddress
            self.modificationStates = modificationStates
            self.rootVolumeEncryptionEnabled = rootVolumeEncryptionEnabled
            self.state = state
            self.subnetId = subnetId
            self.userName = userName
            self.userVolumeEncryptionEnabled = userVolumeEncryptionEnabled
            self.volumeEncryptionKey = volumeEncryptionKey
            self.workspaceId = workspaceId
            self.workspaceProperties = workspaceProperties
        }

        private enum CodingKeys: String, CodingKey {
            case bundleId = "BundleId"
            case computerName = "ComputerName"
            case directoryId = "DirectoryId"
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case ipAddress = "IpAddress"
            case modificationStates = "ModificationStates"
            case rootVolumeEncryptionEnabled = "RootVolumeEncryptionEnabled"
            case state = "State"
            case subnetId = "SubnetId"
            case userName = "UserName"
            case userVolumeEncryptionEnabled = "UserVolumeEncryptionEnabled"
            case volumeEncryptionKey = "VolumeEncryptionKey"
            case workspaceId = "WorkspaceId"
            case workspaceProperties = "WorkspaceProperties"
        }
    }

    public struct WorkspaceAccessProperties: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether users can use Android devices to access their WorkSpaces.
        public let deviceTypeAndroid: AccessPropertyValue?
        /// Indicates whether users can use Chromebooks to access their WorkSpaces.
        public let deviceTypeChromeOs: AccessPropertyValue?
        /// Indicates whether users can use iOS devices to access their WorkSpaces.
        public let deviceTypeIos: AccessPropertyValue?
        /// Indicates whether users can use macOS clients to access their WorkSpaces. To restrict WorkSpaces access to trusted devices (also known as managed devices) with valid certificates, specify a value of TRUST. For more information, see Restrict WorkSpaces Access to Trusted Devices.
        public let deviceTypeOsx: AccessPropertyValue?
        /// Indicates whether users can access their WorkSpaces through a web browser.
        public let deviceTypeWeb: AccessPropertyValue?
        /// Indicates whether users can use Windows clients to access their WorkSpaces. To restrict WorkSpaces access to trusted devices (also known as managed devices) with valid certificates, specify a value of TRUST. For more information, see Restrict WorkSpaces Access to Trusted Devices.
        public let deviceTypeWindows: AccessPropertyValue?
        /// Indicates whether users can use zero client devices to access their WorkSpaces.
        public let deviceTypeZeroClient: AccessPropertyValue?

        public init(deviceTypeAndroid: AccessPropertyValue? = nil, deviceTypeChromeOs: AccessPropertyValue? = nil, deviceTypeIos: AccessPropertyValue? = nil, deviceTypeOsx: AccessPropertyValue? = nil, deviceTypeWeb: AccessPropertyValue? = nil, deviceTypeWindows: AccessPropertyValue? = nil, deviceTypeZeroClient: AccessPropertyValue? = nil) {
            self.deviceTypeAndroid = deviceTypeAndroid
            self.deviceTypeChromeOs = deviceTypeChromeOs
            self.deviceTypeIos = deviceTypeIos
            self.deviceTypeOsx = deviceTypeOsx
            self.deviceTypeWeb = deviceTypeWeb
            self.deviceTypeWindows = deviceTypeWindows
            self.deviceTypeZeroClient = deviceTypeZeroClient
        }

        private enum CodingKeys: String, CodingKey {
            case deviceTypeAndroid = "DeviceTypeAndroid"
            case deviceTypeChromeOs = "DeviceTypeChromeOs"
            case deviceTypeIos = "DeviceTypeIos"
            case deviceTypeOsx = "DeviceTypeOsx"
            case deviceTypeWeb = "DeviceTypeWeb"
            case deviceTypeWindows = "DeviceTypeWindows"
            case deviceTypeZeroClient = "DeviceTypeZeroClient"
        }
    }

    public struct WorkspaceBundle: AWSDecodableShape {
        /// The bundle identifier.
        public let bundleId: String?
        /// The compute type. For more information, see Amazon WorkSpaces Bundles.
        public let computeType: ComputeType?
        /// A description.
        public let description: String?
        /// The image identifier of the bundle.
        public let imageId: String?
        /// The last time that the bundle was updated.
        public let lastUpdatedTime: Date?
        /// The name of the bundle.
        public let name: String?
        /// The owner of the bundle. This is the account identifier of the owner, or AMAZON if the bundle is provided by AWS.
        public let owner: String?
        /// The size of the root volume.
        public let rootStorage: RootStorage?
        /// The size of the user storage.
        public let userStorage: UserStorage?

        public init(bundleId: String? = nil, computeType: ComputeType? = nil, description: String? = nil, imageId: String? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, owner: String? = nil, rootStorage: RootStorage? = nil, userStorage: UserStorage? = nil) {
            self.bundleId = bundleId
            self.computeType = computeType
            self.description = description
            self.imageId = imageId
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.owner = owner
            self.rootStorage = rootStorage
            self.userStorage = userStorage
        }

        private enum CodingKeys: String, CodingKey {
            case bundleId = "BundleId"
            case computeType = "ComputeType"
            case description = "Description"
            case imageId = "ImageId"
            case lastUpdatedTime = "LastUpdatedTime"
            case name = "Name"
            case owner = "Owner"
            case rootStorage = "RootStorage"
            case userStorage = "UserStorage"
        }
    }

    public struct WorkspaceConnectionStatus: AWSDecodableShape {
        /// The connection state of the WorkSpace. The connection state is unknown if the WorkSpace is stopped.
        public let connectionState: ConnectionState?
        /// The timestamp of the connection status check.
        public let connectionStateCheckTimestamp: Date?
        /// The timestamp of the last known user connection.
        public let lastKnownUserConnectionTimestamp: Date?
        /// The identifier of the WorkSpace.
        public let workspaceId: String?

        public init(connectionState: ConnectionState? = nil, connectionStateCheckTimestamp: Date? = nil, lastKnownUserConnectionTimestamp: Date? = nil, workspaceId: String? = nil) {
            self.connectionState = connectionState
            self.connectionStateCheckTimestamp = connectionStateCheckTimestamp
            self.lastKnownUserConnectionTimestamp = lastKnownUserConnectionTimestamp
            self.workspaceId = workspaceId
        }

        private enum CodingKeys: String, CodingKey {
            case connectionState = "ConnectionState"
            case connectionStateCheckTimestamp = "ConnectionStateCheckTimestamp"
            case lastKnownUserConnectionTimestamp = "LastKnownUserConnectionTimestamp"
            case workspaceId = "WorkspaceId"
        }
    }

    public struct WorkspaceCreationProperties: AWSEncodableShape {
        /// The identifier of your custom security group.
        public let customSecurityGroupId: String?
        /// The default organizational unit (OU) for your WorkSpaces directories. This string must be the full Lightweight Directory Access Protocol (LDAP) distinguished name for the target domain and OU. It must be in the form "OU=value,DC=value,DC=value", where value is any string of characters, and the number of domain components (DCs) is two or more. For example, OU=WorkSpaces_machines,DC=machines,DC=example,DC=com.     To avoid errors, certain characters in the distinguished name must be escaped. For more information, see  Distinguished Names in the Microsoft documentation.   The API doesn't validate whether the OU exists.
        public let defaultOu: String?
        /// Indicates whether internet access is enabled for your WorkSpaces.
        public let enableInternetAccess: Bool?
        /// Indicates whether maintenance mode is enabled for your WorkSpaces. For more information, see WorkSpace Maintenance.
        public let enableMaintenanceMode: Bool?
        /// Indicates whether Amazon WorkDocs is enabled for your WorkSpaces.  If WorkDocs is already enabled for a WorkSpaces directory and you disable it, new WorkSpaces launched in the directory will not have WorkDocs enabled. However, WorkDocs remains enabled for any existing WorkSpaces, unless you either disable users' access to WorkDocs or you delete the WorkDocs site. To disable users' access to WorkDocs, see Disabling Users in the Amazon WorkDocs Administration Guide. To delete a WorkDocs site, see Deleting a Site in the Amazon WorkDocs Administration Guide. If you enable WorkDocs on a directory that already has existing WorkSpaces, the existing WorkSpaces and any new WorkSpaces that are launched in the directory will have WorkDocs enabled.
        public let enableWorkDocs: Bool?
        /// Indicates whether users are local administrators of their WorkSpaces.
        public let userEnabledAsLocalAdministrator: Bool?

        public init(customSecurityGroupId: String? = nil, defaultOu: String? = nil, enableInternetAccess: Bool? = nil, enableMaintenanceMode: Bool? = nil, enableWorkDocs: Bool? = nil, userEnabledAsLocalAdministrator: Bool? = nil) {
            self.customSecurityGroupId = customSecurityGroupId
            self.defaultOu = defaultOu
            self.enableInternetAccess = enableInternetAccess
            self.enableMaintenanceMode = enableMaintenanceMode
            self.enableWorkDocs = enableWorkDocs
            self.userEnabledAsLocalAdministrator = userEnabledAsLocalAdministrator
        }

        public func validate(name: String) throws {
            try self.validate(self.customSecurityGroupId, name: "customSecurityGroupId", parent: name, max: 20)
            try self.validate(self.customSecurityGroupId, name: "customSecurityGroupId", parent: name, min: 11)
            try self.validate(self.customSecurityGroupId, name: "customSecurityGroupId", parent: name, pattern: "^(sg-([0-9a-f]{8}|[0-9a-f]{17}))$")
        }

        private enum CodingKeys: String, CodingKey {
            case customSecurityGroupId = "CustomSecurityGroupId"
            case defaultOu = "DefaultOu"
            case enableInternetAccess = "EnableInternetAccess"
            case enableMaintenanceMode = "EnableMaintenanceMode"
            case enableWorkDocs = "EnableWorkDocs"
            case userEnabledAsLocalAdministrator = "UserEnabledAsLocalAdministrator"
        }
    }

    public struct WorkspaceDirectory: AWSDecodableShape {
        /// The directory alias.
        public let alias: String?
        /// The user name for the service account.
        public let customerUserName: String?
        /// The directory identifier.
        public let directoryId: String?
        /// The name of the directory.
        public let directoryName: String?
        /// The directory type.
        public let directoryType: WorkspaceDirectoryType?
        /// The IP addresses of the DNS servers for the directory.
        public let dnsIpAddresses: [String]?
        /// The identifier of the IAM role. This is the role that allows Amazon WorkSpaces to make calls to other services, such as Amazon EC2, on your behalf.
        public let iamRoleId: String?
        /// The identifiers of the IP access control groups associated with the directory.
        public let ipGroupIds: [String]?
        /// The registration code for the directory. This is the code that users enter in their Amazon WorkSpaces client application to connect to the directory.
        public let registrationCode: String?
        /// The default self-service permissions for WorkSpaces in the directory.
        public let selfservicePermissions: SelfservicePermissions?
        /// The state of the directory's registration with Amazon WorkSpaces. After a directory is deregistered, the DEREGISTERED state is returned very briefly before the directory metadata is cleaned up, so this state is rarely returned. To confirm that a directory is deregistered, check for the directory ID by using  DescribeWorkspaceDirectories. If the directory ID isn't returned, then the directory has been successfully deregistered.
        public let state: WorkspaceDirectoryState?
        /// The identifiers of the subnets used with the directory.
        public let subnetIds: [String]?
        /// Specifies whether the directory is dedicated or shared. To use Bring Your Own License (BYOL), this value must be set to DEDICATED. For more information, see Bring Your Own Windows Desktop Images.
        public let tenancy: Tenancy?
        /// The devices and operating systems that users can use to access WorkSpaces.
        public let workspaceAccessProperties: WorkspaceAccessProperties?
        /// The default creation properties for all WorkSpaces in the directory.
        public let workspaceCreationProperties: DefaultWorkspaceCreationProperties?
        /// The identifier of the security group that is assigned to new WorkSpaces.
        public let workspaceSecurityGroupId: String?

        public init(alias: String? = nil, customerUserName: String? = nil, directoryId: String? = nil, directoryName: String? = nil, directoryType: WorkspaceDirectoryType? = nil, dnsIpAddresses: [String]? = nil, iamRoleId: String? = nil, ipGroupIds: [String]? = nil, registrationCode: String? = nil, selfservicePermissions: SelfservicePermissions? = nil, state: WorkspaceDirectoryState? = nil, subnetIds: [String]? = nil, tenancy: Tenancy? = nil, workspaceAccessProperties: WorkspaceAccessProperties? = nil, workspaceCreationProperties: DefaultWorkspaceCreationProperties? = nil, workspaceSecurityGroupId: String? = nil) {
            self.alias = alias
            self.customerUserName = customerUserName
            self.directoryId = directoryId
            self.directoryName = directoryName
            self.directoryType = directoryType
            self.dnsIpAddresses = dnsIpAddresses
            self.iamRoleId = iamRoleId
            self.ipGroupIds = ipGroupIds
            self.registrationCode = registrationCode
            self.selfservicePermissions = selfservicePermissions
            self.state = state
            self.subnetIds = subnetIds
            self.tenancy = tenancy
            self.workspaceAccessProperties = workspaceAccessProperties
            self.workspaceCreationProperties = workspaceCreationProperties
            self.workspaceSecurityGroupId = workspaceSecurityGroupId
        }

        private enum CodingKeys: String, CodingKey {
            case alias = "Alias"
            case customerUserName = "CustomerUserName"
            case directoryId = "DirectoryId"
            case directoryName = "DirectoryName"
            case directoryType = "DirectoryType"
            case dnsIpAddresses = "DnsIpAddresses"
            case iamRoleId = "IamRoleId"
            case ipGroupIds
            case registrationCode = "RegistrationCode"
            case selfservicePermissions = "SelfservicePermissions"
            case state = "State"
            case subnetIds = "SubnetIds"
            case tenancy = "Tenancy"
            case workspaceAccessProperties = "WorkspaceAccessProperties"
            case workspaceCreationProperties = "WorkspaceCreationProperties"
            case workspaceSecurityGroupId = "WorkspaceSecurityGroupId"
        }
    }

    public struct WorkspaceImage: AWSDecodableShape {
        /// The date when the image was created. If the image has been shared, the AWS account that the image has been shared with sees the original creation date of the image.
        public let created: Date?
        /// The description of the image.
        public let description: String?
        /// The error code that is returned for the image.
        public let errorCode: String?
        /// The text of the error message that is returned for the image.
        public let errorMessage: String?
        /// The identifier of the image.
        public let imageId: String?
        /// The name of the image.
        public let name: String?
        /// The operating system that the image is running.
        public let operatingSystem: OperatingSystem?
        /// The identifier of the AWS account that owns the image.
        public let ownerAccountId: String?
        /// Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is enabled, this value is set to DEDICATED. For more information, see Bring Your Own Windows Desktop Images.
        public let requiredTenancy: WorkspaceImageRequiredTenancy?
        /// The status of the image.
        public let state: WorkspaceImageState?

        public init(created: Date? = nil, description: String? = nil, errorCode: String? = nil, errorMessage: String? = nil, imageId: String? = nil, name: String? = nil, operatingSystem: OperatingSystem? = nil, ownerAccountId: String? = nil, requiredTenancy: WorkspaceImageRequiredTenancy? = nil, state: WorkspaceImageState? = nil) {
            self.created = created
            self.description = description
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.imageId = imageId
            self.name = name
            self.operatingSystem = operatingSystem
            self.ownerAccountId = ownerAccountId
            self.requiredTenancy = requiredTenancy
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case created = "Created"
            case description = "Description"
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case imageId = "ImageId"
            case name = "Name"
            case operatingSystem = "OperatingSystem"
            case ownerAccountId = "OwnerAccountId"
            case requiredTenancy = "RequiredTenancy"
            case state = "State"
        }
    }

    public struct WorkspaceProperties: AWSEncodableShape & AWSDecodableShape {
        /// The compute type. For more information, see Amazon WorkSpaces Bundles.
        public let computeTypeName: Compute?
        /// The size of the root volume. For important information about how to modify the size of the root and user volumes, see Modify a WorkSpace.
        public let rootVolumeSizeGib: Int?
        /// The running mode. For more information, see Manage the WorkSpace Running Mode.
        public let runningMode: RunningMode?
        /// The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute intervals.
        public let runningModeAutoStopTimeoutInMinutes: Int?
        /// The size of the user storage. For important information about how to modify the size of the root and user volumes, see Modify a WorkSpace.
        public let userVolumeSizeGib: Int?

        public init(computeTypeName: Compute? = nil, rootVolumeSizeGib: Int? = nil, runningMode: RunningMode? = nil, runningModeAutoStopTimeoutInMinutes: Int? = nil, userVolumeSizeGib: Int? = nil) {
            self.computeTypeName = computeTypeName
            self.rootVolumeSizeGib = rootVolumeSizeGib
            self.runningMode = runningMode
            self.runningModeAutoStopTimeoutInMinutes = runningModeAutoStopTimeoutInMinutes
            self.userVolumeSizeGib = userVolumeSizeGib
        }

        private enum CodingKeys: String, CodingKey {
            case computeTypeName = "ComputeTypeName"
            case rootVolumeSizeGib = "RootVolumeSizeGib"
            case runningMode = "RunningMode"
            case runningModeAutoStopTimeoutInMinutes = "RunningModeAutoStopTimeoutInMinutes"
            case userVolumeSizeGib = "UserVolumeSizeGib"
        }
    }

    public struct WorkspaceRequest: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles to list the available bundles.
        public let bundleId: String
        /// The identifier of the AWS Directory Service directory for the WorkSpace. You can use DescribeWorkspaceDirectories to list the available directories.
        public let directoryId: String
        /// Indicates whether the data stored on the root volume is encrypted.
        public let rootVolumeEncryptionEnabled: Bool?
        /// The tags for the WorkSpace.
        public let tags: [Tag]?
        /// The user name of the user for the WorkSpace. This user name must exist in the AWS Directory Service directory for the WorkSpace.
        public let userName: String
        /// Indicates whether the data stored on the user volume is encrypted.
        public let userVolumeEncryptionEnabled: Bool?
        /// The symmetric AWS KMS customer master key (CMK) used to encrypt data stored on your WorkSpace. Amazon WorkSpaces does not support asymmetric CMKs.
        public let volumeEncryptionKey: String?
        /// The WorkSpace properties.
        public let workspaceProperties: WorkspaceProperties?

        public init(bundleId: String, directoryId: String, rootVolumeEncryptionEnabled: Bool? = nil, tags: [Tag]? = nil, userName: String, userVolumeEncryptionEnabled: Bool? = nil, volumeEncryptionKey: String? = nil, workspaceProperties: WorkspaceProperties? = nil) {
            self.bundleId = bundleId
            self.directoryId = directoryId
            self.rootVolumeEncryptionEnabled = rootVolumeEncryptionEnabled
            self.tags = tags
            self.userName = userName
            self.userVolumeEncryptionEnabled = userVolumeEncryptionEnabled
            self.volumeEncryptionKey = volumeEncryptionKey
            self.workspaceProperties = workspaceProperties
        }

        public func validate(name: String) throws {
            try self.validate(self.bundleId, name: "bundleId", parent: name, pattern: "^wsb-[0-9a-z]{8,63}$")
            try self.validate(self.directoryId, name: "directoryId", parent: name, max: 65)
            try self.validate(self.directoryId, name: "directoryId", parent: name, min: 10)
            try self.validate(self.directoryId, name: "directoryId", parent: name, pattern: "^d-[0-9a-f]{8,63}$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.userName, name: "userName", parent: name, max: 63)
            try self.validate(self.userName, name: "userName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case bundleId = "BundleId"
            case directoryId = "DirectoryId"
            case rootVolumeEncryptionEnabled = "RootVolumeEncryptionEnabled"
            case tags = "Tags"
            case userName = "UserName"
            case userVolumeEncryptionEnabled = "UserVolumeEncryptionEnabled"
            case volumeEncryptionKey = "VolumeEncryptionKey"
            case workspaceProperties = "WorkspaceProperties"
        }
    }

    public struct WorkspacesIpGroup: AWSDecodableShape {
        /// The description of the group.
        public let groupDesc: String?
        /// The identifier of the group.
        public let groupId: String?
        /// The name of the group.
        public let groupName: String?
        /// The rules.
        public let userRules: [IpRuleItem]?

        public init(groupDesc: String? = nil, groupId: String? = nil, groupName: String? = nil, userRules: [IpRuleItem]? = nil) {
            self.groupDesc = groupDesc
            self.groupId = groupId
            self.groupName = groupName
            self.userRules = userRules
        }

        private enum CodingKeys: String, CodingKey {
            case groupDesc
            case groupId
            case groupName
            case userRules
        }
    }
}
